package com.stone.serverless.sdk.rumtime;

import com.stone.serverless.sdk.enums.RuntimeTypeEnum;
import com.stone.serverless.sdk.loader.ModuleClassLoader;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: TODO
 * @Author: MECHREVO
 * @Date: 2022/1/23 16:57
 * @Version: 1.0.0
 */
public class ContainerRuntime {

    protected static Map<RuntimeTypeEnum, Class> RUNTIME_MAP = new HashMap();

    public static void put(RuntimeTypeEnum runTimeTypeEnum, Class containerRuntime) {
        RUNTIME_MAP.put(runTimeTypeEnum, containerRuntime);
    }

    public static Class<ContainerRuntime> get(RuntimeTypeEnum runTimeType) {
        return RUNTIME_MAP.get(runTimeType);
    }

    public void initContainer(ModuleClassLoader moduleClassLoader) {


    }

    public void uninstall() {


    }

    public List<Object> getRouters(ModuleClassLoader moduleClassLoader) {
        return null;
    }

    public void refresh() {


    }

    public Object getInstance(String className, ModuleClassLoader moduleClassLoader) {
        return null;
    }
}
